package com.czxy.demo01;

import java.util.ArrayList;
import java.util.List;

public class Test10 {
    public static void main(String[] args) {

        String [] strs = {"12","345","6789","1","123","4567"};

        show(strs);
    }

    public static void show(String [] strs){
        List<String> jlist = new ArrayList<>();
        List<String> olist = new ArrayList<>();

        for (String str : strs) {
            if(str.length()%2==0){
                olist.add(str);
            }else {
                jlist.add(str);
            }
        }

        System.out.println("偶数长度字符串:"+olist);
        System.out.println("奇数长度字符串:"+jlist);
    }

}
